package com.ita.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ita.dao.TenderRecordDao;
import com.ita.pojo.TenderRecord;
import com.ita.service.TenderRecordService;

@Service(value="tenderRecordService")
public class TenderRecordServiceImpl implements TenderRecordService {

	@Autowired(required=true)
	private TenderRecordDao trd;

	@Transactional
	@Override
	public TenderRecord add(TenderRecord t) {
		return trd.add(t);
	}
	
	@Transactional
	@Override
	public int update(TenderRecord record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Transactional
	@Override
	public int update(String activityId, String mid, int state) {
		return trd.UpdateRecord(mid, state,activityId);
	}

	@Override
	public TenderRecord find(String activityId, String mid) {
		return trd.find(activityId, mid);
		
	}
	
	@Override
	public List<TenderRecord> findAll(String mid) {
		return trd.findAll(mid);
	}
	
}
